﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DiscussionHomeUserControl.ascx.cs" Inherits="JM.JCY.SharePointComponent.Discussion.DiscussionHome.DiscussionHomeUserControl" %>
<script type="text/javascript">
    _spOriginalFormAction = document.forms[0].action;
    _spSuppressFormOnSubmitWrapper = true;

    $(document).ready(function () {
        $("#toggleDiscussion1").click(function () {
            var div = document.getElementById("divToggleDiscussion");
            if (div.style.display == "") {
                div.style.display = "none";
                $("#imgToggleDiscussion").attr("src", "/_layouts/JM.JCY.Resource/images/toggle_expand.png");

            }
            else {
                div.style.display = "";
                $("#imgToggleDiscussion").attr("src", "/_layouts/JM.JCY.Resource/images/toggle_collapse.png");
            }
        });

        $("#toggleDiscussion2").click(function () {
            var div = document.getElementById("divToggleDiscussion");
            if (div.style.display == "") {
                div.style.display = "none";
                $("#imgToggleDiscussion").attr("src", "/_layouts/JM.JCY.Resource/images/toggle_expand.png");

            }
            else {
                div.style.display = "";
                $("#imgToggleDiscussion").attr("src", "/_layouts/JM.JCY.Resource/images/toggle_collapse.png");
            }
        });

    });
  

</script>

<div>
    <table class="main" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td>
                <table class="webpart" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <th class="title" align="left" id="toggleDiscussion1" style="cursor: pointer" width="50%">
                            <img src="/_layouts/JM.JCY.Resource/images/discussion.png" width="24"/>
                            专题讨论
                        </th>
                        <th id="toggleDiscussion2" class="link" align="right" style="cursor: pointer" width="50%">
                            <img class="toggle" id="imgToggleDiscussion" src="/_layouts/JM.JCY.Resource/images/toggle_collapse.png" />
                        </th>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div id="divToggleDiscussion">
                                <SharePoint:ListView ID="lvDiscussion" runat="server"></SharePoint:ListView>
                                <br />
                           
                                 <hr />
                                <table width="100%">
                                    <tr>
                                        <td width="40%">
                                            <span style="height: 10px; width: 10px; position: relative; display: inline-block;
                                                overflow: hidden;" class="s4-clust">
                                                <img src="/_layouts/images/fgimg.png" alt="" style="left: -0px !important; top: -128px !important;
                                                    position: absolute;" />
                                            </span><a class="ms-addnew" id="idHomePageNewItemDis" href="#" target="_self" runat="server">
                                                新建讨论</a>
                                        </td>
                                        <td align="right" width="40%">
                                            <asp:LinkButton ID="lbViewAllDiscussion" runat="server" 
                                                onclick="lbViewAllDiscussion_Click">更多...</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>